#include "Vector3.h"
#include <iostream>
using namespace std;

extern const Vector3<float> kZeroVector(0, 0, 0);

static void test001();

template<typename RT>
ostream &operator<<(ostream &out, const Vector3<RT> &a)
{
    out << "[" << a.x << ", " << a.y << ", " << a.z << "]";
    return out;
}

int main()
{
    cout << "Vector3 Study 2021.01.27 ..." << endl;
    test001();
    return 0;
}

void test001()
{
    typedef float RT;
    Vector3<RT> a(kZeroVector), b(kZeroVector);
    cout << "a = " << a << endl;
    cout << "b = " << b << endl;
    a.x = 99;
    b.y = 100;
    a.z = 101;
    cout << "a     = " << a << endl;
    cout << "b     = " << b << endl;
    cout << "a + b = " << a + b << endl;
    cout << "3 * a = " << 3 * a << endl;
    cout << "a * 3 = " << a * 3 << endl;
    cout << "a / 2 = " << a / 2 << endl;
    cout << "a /= 2 = " << (a /= 2) << endl;
    cout << "a     = " << a << endl;
    cout << "a == b = " << (a == b) << endl;
}